<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>家政服务订单 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .input-field {
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 10px 12px;
      width: 100%;
      font-size: 14px;
      transition: all 0.2s;
    }
    
    .input-field:focus {
      border-color: var(--primary);
      outline: none;
      box-shadow: 0 0 0 2px rgba(255, 126, 45, 0.2);
    }
    
    .form-section {
      border-bottom: 8px solid #f8f8f8;
    }
    
    .checkbox-custom {
      width: 18px;
      height: 18px;
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      position: relative;
      display: inline-block;
      vertical-align: middle;
      margin-right: 8px;
    }
    
    .checkbox-custom.checked {
      background-color: var(--primary);
      border-color: var(--primary);
    }
    
    .checkbox-custom.checked:after {
      content: '';
      position: absolute;
      left: 6px;
      top: 3px;
      width: 5px;
      height: 9px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="cleaning.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">家政服务订单</h1>
    </div>
    
    <!-- 服务信息 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务信息</h2>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mb-4 flex items-start">
        <div class="w-16 h-16 rounded-lg bg-orange-100 flex items-center justify-center mr-3">
          <i class="fas fa-broom text-2xl primary-color"></i>
        </div>
        <div class="flex-1">
          <div class="flex items-center justify-between">
            <h3 class="font-medium">日常家居保洁</h3>
            <span class="primary-color font-bold">¥60/小时</span>
          </div>
          <p class="text-xs text-gray-500 mt-1">3小时起订</p>
          <div class="flex items-center mt-1">
            <span class="text-xs primary-color">⭐ 4.9分</span>
            <span class="mx-2 text-gray-300">|</span>
            <span class="text-xs text-gray-500">已售 1024</span>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 服务范围选择 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务范围</h2>
      
      <div class="grid grid-cols-2 gap-3">
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom checked"></div>
          <span>客厅</span>
        </div>
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom checked"></div>
          <span>卧室</span>
        </div>
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom checked"></div>
          <span>厨房</span>
        </div>
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom checked"></div>
          <span>卫生间</span>
        </div>
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom"></div>
          <span>阳台</span>
        </div>
        <div class="flex items-center p-3 border rounded-lg bg-white">
          <div class="checkbox-custom"></div>
          <span>窗户</span>
        </div>
      </div>
      
      <div class="mt-4">
        <label class="block text-sm text-gray-600 mb-2">房屋面积</label>
        <div class="flex items-center border rounded-lg p-3 bg-white">
          <span>80-100㎡</span>
          <i class="fas fa-chevron-right ml-auto text-gray-400"></i>
        </div>
      </div>
    </div>
    
    <!-- 服务时间 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务时间</h2>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">服务日期</label>
        <div class="flex items-center border rounded-lg p-3 bg-white">
          <span>2023年9月20日</span>
          <i class="fas fa-calendar ml-auto text-gray-400"></i>
        </div>
      </div>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">服务时间</label>
        <div class="flex items-center border rounded-lg p-3 bg-white">
          <span>14:00-17:00</span>
          <i class="fas fa-clock ml-auto text-gray-400"></i>
        </div>
      </div>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">服务时长</label>
        <div class="flex items-center justify-between bg-gray-50 p-3 rounded-lg">
          <div class="flex items-center">
            <button class="w-8 h-8 rounded-full border border-gray-300 flex items-center justify-center">
              <i class="fas fa-minus text-gray-400"></i>
            </button>
            <span class="mx-4 text-lg font-medium">3小时</span>
            <button class="w-8 h-8 rounded-full border border-gray-300 flex items-center justify-center">
              <i class="fas fa-plus text-gray-400"></i>
            </button>
          </div>
          <div>
            <span class="text-sm primary-color font-bold">¥180</span>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 服务工具 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务工具</h2>
      
      <div class="flex items-center justify-between p-3 border rounded-lg bg-white mb-3">
        <div class="flex items-center">
          <div class="checkbox-custom checked"></div>
          <span>服务人员自带清洁工具</span>
        </div>
        <span class="text-xs primary-color">免费</span>
      </div>
      
      <div class="flex items-center justify-between p-3 border rounded-lg bg-white">
        <div class="flex items-center">
          <div class="checkbox-custom"></div>
          <span>使用环保清洁剂</span>
        </div>
        <span class="text-xs primary-color">+¥20</span>
      </div>
    </div>
    
    <!-- 地址信息 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务地址</h2>
      
      <div class="mb-4 flex items-center justify-between">
        <span class="text-sm">选择已有地址</span>
        <a href="#" class="text-sm primary-color">管理地址 <i class="fas fa-chevron-right text-xs"></i></a>
      </div>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mb-3 flex items-center">
        <div class="flex-1">
          <div class="flex items-center">
            <span class="font-medium">张先生</span>
            <span class="text-sm text-gray-500 ml-4">13812345678</span>
          </div>
          <p class="text-sm text-gray-600 mt-1">北京市朝阳区建国路88号现代城7号楼1单元801</p>
        </div>
        <div class="ml-3">
          <div class="w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center">
            <div class="w-3 h-3 rounded-full bg-primary"></div>
          </div>
        </div>
      </div>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mb-4 flex items-center">
        <div class="flex-1">
          <div class="flex items-center">
            <span class="font-medium">张先生</span>
            <span class="text-sm text-gray-500 ml-4">13812345678</span>
          </div>
          <p class="text-sm text-gray-600 mt-1">北京市海淀区中关村南大街5号科技大厦B座2302</p>
        </div>
        <div class="ml-3">
          <div class="w-5 h-5 rounded-full border-2 border-gray-300"></div>
        </div>
      </div>
    </div>
    
    <!-- 联系人信息 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">联系人信息</h2>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">联系人</label>
        <input type="text" class="input-field" placeholder="请输入联系人姓名" value="张先生">
      </div>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">手机号码</label>
        <input type="tel" class="input-field" placeholder="请输入手机号码" value="13812345678">
      </div>
    </div>
    
    <!-- 服务要求 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">服务要求</h2>
      
      <div class="mb-4">
        <label class="block text-sm text-gray-600 mb-2">备注信息</label>
        <textarea class="input-field" rows="3" placeholder="请输入特殊要求或备注信息">家里有宠物猫，请服务人员注意安全，谢谢</textarea>
      </div>
    </div>
    
    <!-- 支付方式 -->
    <div class="form-section p-4">
      <h2 class="font-medium mb-4">支付方式</h2>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mb-3 flex items-center">
        <i class="fab fa-weixin text-green-500 text-xl mr-3"></i>
        <span>微信支付</span>
        <div class="ml-auto">
          <div class="w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center">
            <div class="w-3 h-3 rounded-full bg-primary"></div>
          </div>
        </div>
      </div>
      
      <div class="bg-white border border-gray-200 rounded-lg p-3 mb-3 flex items-center">
        <i class="fab fa-alipay text-blue-500 text-xl mr-3"></i>
        <span>支付宝</span>
        <div class="ml-auto">
          <div class="w-5 h-5 rounded-full border-2 border-gray-300"></div>
        </div>
      </div>
    </div>
    
    <!-- 优惠券 -->
    <div class="form-section p-4">
      <div class="flex items-center justify-between">
        <h2 class="font-medium">优惠券</h2>
        <a href="#" class="text-sm primary-color">2张可用 <i class="fas fa-chevron-right text-xs"></i></a>
      </div>
    </div>
    
    <!-- 价格详情 -->
    <div class="p-4">
      <h2 class="font-medium mb-4">价格详情</h2>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">服务费用</span>
        <span>¥180.00 (60元×3小时)</span>
      </div>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">清洁工具</span>
        <span>¥0.00</span>
      </div>
      
      <div class="mb-3 flex justify-between">
        <span class="text-gray-600">优惠券</span>
        <span class="primary-color">-¥20.00</span>
      </div>
      
      <div class="pt-3 border-t border-gray-100 flex justify-between">
        <span class="font-medium">实付金额</span>
        <span class="font-bold primary-color">¥160.00</span>
      </div>
    </div>
    
    <!-- 底部结算栏 -->
    <div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-100 p-4 flex items-center justify-between" style="width: 375px; margin: 0 auto;">
      <div>
        <span class="text-sm text-gray-500">实付金额：</span>
        <span class="text-lg font-bold primary-color">¥160.00</span>
      </div>
      <button class="btn-primary px-8 py-2 rounded-full">提交订单</button>
    </div>
    
    <!-- 底部空间 -->
    <div class="pb-20"></div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 服务范围选择
      const checkboxes = document.querySelectorAll('.checkbox-custom');
      checkboxes.forEach(checkbox => {
        checkbox.addEventListener('click', function() {
          this.classList.toggle('checked');
        });
      });
      
      // 选择地址
      const addressOptions = document.querySelectorAll('.bg-white.border.rounded-lg');
      addressOptions.forEach(option => {
        option.addEventListener('click', function() {
          const radioBtn = this.querySelector('.w-5.h-5');
          if (radioBtn) {
            addressOptions.forEach(opt => {
              const rb = opt.querySelector('.w-5.h-5');
              if (rb) {
                rb.className = 'w-5 h-5 rounded-full border-2 border-gray-300';
                rb.innerHTML = '';
              }
            });
            
            radioBtn.className = 'w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center';
            radioBtn.innerHTML = '<div class="w-3 h-3 rounded-full bg-primary"></div>';
          }
        });
      });
      
      // 选择支付方式
      const paymentOptions = document.querySelectorAll('.form-section:nth-child(7) .bg-white.border');
      paymentOptions.forEach(option => {
        option.addEventListener('click', function() {
          paymentOptions.forEach(opt => {
            opt.querySelector('.w-5.h-5').className = 'w-5 h-5 rounded-full border-2 border-gray-300';
            opt.querySelector('.w-5.h-5').innerHTML = '';
          });
          
          const radioBtn = this.querySelector('.w-5.h-5');
          radioBtn.className = 'w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center';
          radioBtn.innerHTML = '<div class="w-3 h-3 rounded-full bg-primary"></div>';
        });
      });
      
      // 时长调整
      const minusBtn = document.querySelector('.fas.fa-minus').parentNode;
      const plusBtn = document.querySelector('.fas.fa-plus').parentNode;
      const hoursSpan = document.querySelector('.mx-4.text-lg.font-medium');
      const priceSpan = document.querySelector('.text-sm.primary-color.font-bold');
      
      minusBtn.addEventListener('click', function() {
        let hours = parseInt(hoursSpan.textContent);
        if (hours > 3) {
          hours--;
          hoursSpan.textContent = hours + '小时';
          updatePrice(hours);
        }
      });
      
      plusBtn.addEventListener('click', function() {
        let hours = parseInt(hoursSpan.textContent);
        hours++;
        hoursSpan.textContent = hours + '小时';
        updatePrice(hours);
      });
      
      function updatePrice(hours) {
        const basePrice = 60;
        const totalPrice = basePrice * hours;
        priceSpan.textContent = '¥' + totalPrice;
        
        document.querySelector('.mb-3:nth-child(1) span:last-child').textContent = 
          '¥' + totalPrice.toFixed(2) + ' (' + basePrice + '元×' + hours + '小时)';
        
        const discount = 20;
        const finalPrice = totalPrice - discount;
        
        document.querySelector('.pt-3.border-t span:last-child').textContent = 
          '¥' + finalPrice.toFixed(2);
        document.querySelector('.text-lg.font-bold.primary-color').textContent = 
          '¥' + finalPrice.toFixed(2);
      }
    });
  </script>
</body>
</html> 